
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>三、数据库、表操作 · 计算机笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="海拉尔的三角">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-pro-fixed/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-ancre-navigation/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-insert-logo-link-website/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism-tomorrow.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-lightbox/css/lightbox.min.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-auto-scroll-table/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-katex-pro/katex.min.css">
                
            
                
                <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-sectionx/sectionx.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-terminull-light/terminull.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="operatorData_withNum.html" />
    
    
    <link rel="prev" href="foundation_withNum.html" />
    

    
        <link rel="shortcut icon" href="image/ico.png" type="image/x-icon">
    
    
    
    
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="image/ico.png">
    
    
        
    
    
        
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://github.com/spite-triangle" target="_blank" class="custom-link">Github</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../../cpp/cpp.html">
            
                <a href="../../cpp/cpp.html">
            
                    
                    C/C++
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="../../cpp/chapter/foundation_withNum.html">
            
                <a href="../../cpp/chapter/foundation_withNum.html">
            
                    
                    一、基础概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="../../cpp/chapter/keyword_withNum.html">
            
                <a href="../../cpp/chapter/keyword_withNum.html">
            
                    
                    二、关键字
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="../../cpp/chapter/point_reference_withNum.html">
            
                <a href="../../cpp/chapter/point_reference_withNum.html">
            
                    
                    三、指针与引用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="../../cpp/chapter/oop_withNum.html">
            
                <a href="../../cpp/chapter/oop_withNum.html">
            
                    
                    四、面向对象
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="../../cpp/chapter/memory_withNum.html">
            
                <a href="../../cpp/chapter/memory_withNum.html">
            
                    
                    五、内存
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="../../cpp/chapter/process_withNum.html">
            
                <a href="../../cpp/chapter/process_withNum.html">
            
                    
                    六、进程与线程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7" data-path="../../cpp/chapter/locks_withNum.html">
            
                <a href="../../cpp/chapter/locks_withNum.html">
            
                    
                    七、锁
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.8" data-path="../../cpp/chapter/stl_withNum.html">
            
                <a href="../../cpp/chapter/stl_withNum.html">
            
                    
                    八、STL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.9" data-path="../../cpp/chapter/dataStruction_withNum.html">
            
                <a href="../../cpp/chapter/dataStruction_withNum.html">
            
                    
                    九、数据结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.10" data-path="../../cpp/chapter/array_list_withNum.html">
            
                <a href="../../cpp/chapter/array_list_withNum.html">
            
                    
                    十、数组链表操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.11" data-path="../../cpp/chapter/find_withNum.html">
            
                <a href="../../cpp/chapter/find_withNum.html">
            
                    
                    十一、目标查找
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.12" data-path="../../cpp/chapter/tree_withNum.html">
            
                <a href="../../cpp/chapter/tree_withNum.html">
            
                    
                    十二、树
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.13" data-path="../../cpp/chapter/binaryTree_withNum.html">
            
                <a href="../../cpp/chapter/binaryTree_withNum.html">
            
                    
                    十三、二叉树
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.14" data-path="../../cpp/chapter/dynamicProgram_withNum.html">
            
                <a href="../../cpp/chapter/dynamicProgram_withNum.html">
            
                    
                    十四、动态规划
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.15" data-path="../../cpp/chapter/backtracking_withNum.html">
            
                <a href="../../cpp/chapter/backtracking_withNum.html">
            
                    
                    十五、回溯算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.16" data-path="../../cpp/chapter/monotoneStack_withNum.html">
            
                <a href="../../cpp/chapter/monotoneStack_withNum.html">
            
                    
                    十六、单调栈
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.17" data-path="../../cpp/chapter/toollib_withNum.html">
            
                <a href="../../cpp/chapter/toollib_withNum.html">
            
                    
                    附录 工具库
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../mysql.html">
            
                <a href="../mysql.html">
            
                    
                    MySQL
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="introduction_withNum.html">
            
                <a href="introduction_withNum.html">
            
                    
                    一、简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="foundation_withNum.html">
            
                <a href="foundation_withNum.html">
            
                    
                    二、控制台操作
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="3.1.3" data-path="operatorDB_withNum.html">
            
                <a href="operatorDB_withNum.html">
            
                    
                    三、数据库、表操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.4" data-path="operatorData_withNum.html">
            
                <a href="operatorData_withNum.html">
            
                    
                    四、数据操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.5" data-path="transaction_withNum.html">
            
                <a href="transaction_withNum.html">
            
                    
                    五、事务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.6" data-path="index_withNum.html">
            
                <a href="index_withNum.html">
            
                    
                    六、索引
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.7" data-path="authority_withNum.html">
            
                <a href="authority_withNum.html">
            
                    
                    七、权限管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.8" data-path="backup_withNum.html">
            
                <a href="backup_withNum.html">
            
                    
                    八、备份
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../../linux/linux.html">
            
                <a href="../../linux/linux.html">
            
                    
                    Linux
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1.1" data-path="../../linux/chapter/foundation_withNum.html">
            
                <a href="../../linux/chapter/foundation_withNum.html">
            
                    
                    一、原理知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.2" data-path="../../linux/chapter/command_withNum.html">
            
                <a href="../../linux/chapter/command_withNum.html">
            
                    
                    二、指令
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../../tcp_udp/tcp_upd.html">
            
                <a href="../../tcp_udp/tcp_upd.html">
            
                    
                    网络
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1.1" data-path="../../tcp_udp/chapter/foundation_withNum.html">
            
                <a href="../../tcp_udp/chapter/foundation_withNum.html">
            
                    
                    一、网络通讯基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.2" data-path="../../tcp_udp/chapter/tcp_udp_withNum.html">
            
                <a href="../../tcp_udp/chapter/tcp_udp_withNum.html">
            
                    
                    二、tcp/udp
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >三、数据库、表操作</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-anchor"></i><ul><li><span class="title-icon "></span><a href="#&#x6570;&#x636E;&#x5E93;&#x3001;&#x8868;&#x64CD;&#x4F5C;"><b></b>&#x6570;&#x636E;&#x5E93;&#x3001;&#x8868;&#x64CD;&#x4F5C;</a></li><li><span class="title-icon "></span><a href="#1-sql&#x8BED;&#x6CD5;"><b></b>1. SQL&#x8BED;&#x6CD5;</a></li><ul><li><span class="title-icon "></span><a href="#11-&#x7ED3;&#x5C3E;"><b></b>1.1. &#x7ED3;&#x5C3E;</a></li><li><span class="title-icon "></span><a href="#12-&#x6CE8;&#x91CA;"><b></b>1.2. &#x6CE8;&#x91CA;</a></li><li><span class="title-icon "></span><a href="#13-&#x7279;&#x6B8A;&#x540D;&#x79F0;"><b></b>1.3. &#x7279;&#x6B8A;&#x540D;&#x79F0;</a></li><li><span class="title-icon "></span><a href="#14-&#x547D;&#x540D;"><b></b>1.4. &#x547D;&#x540D;</a></li></ul><li><span class="title-icon "></span><a href="#2-&#x6570;&#x636E;&#x5E93;&#x9700;&#x8981;&#x64CD;&#x4F5C;&#x7684;&#x5185;&#x5BB9;"><b></b>2. &#x6570;&#x636E;&#x5E93;&#x9700;&#x8981;&#x64CD;&#x4F5C;&#x7684;&#x5185;&#x5BB9;</a></li><li><span class="title-icon "></span><a href="#3-&#x64CD;&#x4F5C;&#x6570;&#x636E;&#x5E93;"><b></b>3. &#x64CD;&#x4F5C;&#x6570;&#x636E;&#x5E93;</a></li><ul><li><span class="title-icon "></span><a href="#31-&#x6DFB;&#x52A0;&#x6570;&#x636E;&#x5E93;"><b></b>3.1. &#x6DFB;&#x52A0;&#x6570;&#x636E;&#x5E93;</a></li><li><span class="title-icon "></span><a href="#32-&#x5220;&#x9664;&#x6570;&#x636E;&#x5E93;"><b></b>3.2. &#x5220;&#x9664;&#x6570;&#x636E;&#x5E93;</a></li><li><span class="title-icon "></span><a href="#33-&#x4F7F;&#x7528;&#x6570;&#x636E;&#x5E93;"><b></b>3.3. &#x4F7F;&#x7528;&#x6570;&#x636E;&#x5E93;</a></li><li><span class="title-icon "></span><a href="#34-&#x5B57;&#x7B26;&#x96C6;"><b></b>3.4. &#x5B57;&#x7B26;&#x96C6;</a></li></ul><li><span class="title-icon "></span><a href="#4-&#x64CD;&#x4F5C;&#x8868;"><b></b>4. &#x64CD;&#x4F5C;&#x8868;</a></li><ul><li><span class="title-icon "></span><a href="#41-&#x6570;&#x636E;&#x5E93;&#x6570;&#x636E;&#x7C7B;&#x578B;"><b></b>4.1. &#x6570;&#x636E;&#x5E93;&#x6570;&#x636E;&#x7C7B;&#x578B;</a></li><ul><li><span class="title-icon "></span><a href="#411-&#x6570;&#x503C;"><b></b>4.1.1. &#x6570;&#x503C;</a></li><li><span class="title-icon "></span><a href="#412-&#x5B57;&#x7B26;&#x4E32;"><b></b>4.1.2. &#x5B57;&#x7B26;&#x4E32;</a></li><li><span class="title-icon "></span><a href="#413-&#x65E5;&#x671F;"><b></b>4.1.3. &#x65E5;&#x671F;</a></li><li><span class="title-icon "></span><a href="#414-null"><b></b>4.1.4. null</a></li></ul><li><span class="title-icon "></span><a href="#42-&#x5B57;&#x6BB5;&#x7684;&#x5C5E;&#x6027;"><b></b>4.2. &#x5B57;&#x6BB5;&#x7684;&#x5C5E;&#x6027;</a></li><li><span class="title-icon "></span><a href="#43-&#x7EA6;&#x675F;"><b></b>4.3. &#x7EA6;&#x675F;</a></li><ul><li><span class="title-icon "></span><a href="#431-&#x5B57;&#x6BB5;&#x7EA6;&#x675F;"><b></b>4.3.1. &#x5B57;&#x6BB5;&#x7EA6;&#x675F;</a></li><li><span class="title-icon "></span><a href="#432-&#x8868;&#x7EA7;&#x7EA6;&#x675F;"><b></b>4.3.2. &#x8868;&#x7EA7;&#x7EA6;&#x675F;</a></li></ul><li><span class="title-icon "></span><a href="#44-&#x8868;&#x7684;&#x5217;&#x540D;&#x6B63;&#x5F0F;&#x9879;&#x76EE;&#x7528;"><b></b>4.4. &#x8868;&#x7684;&#x5217;&#x540D;(&#x6B63;&#x5F0F;&#x9879;&#x76EE;&#x7528;)</a></li><li><span class="title-icon "></span><a href="#45-&#x8868;&#x7684;&#x7C7B;&#x578B;"><b></b>4.5. &#x8868;&#x7684;&#x7C7B;&#x578B;</a></li><li><span class="title-icon "></span><a href="#46-&#x521B;&#x5EFA;&#x8868;"><b></b>4.6. &#x521B;&#x5EFA;&#x8868;</a></li><li><span class="title-icon "></span><a href="#47-&#x67E5;&#x770B;&#x8868;"><b></b>4.7. &#x67E5;&#x770B;&#x8868;</a></li><ul><li><span class="title-icon "></span><a href="#471-&#x67E5;&#x770B;&#x8868;&#x7684;&#x5217;&#x7ED3;&#x6784;"><b></b>4.7.1. &#x67E5;&#x770B;&#x8868;&#x7684;&#x5217;&#x7ED3;&#x6784;</a></li><li><span class="title-icon "></span><a href="#472-&#x67E5;&#x770B;&#x8868;&#x7684;&#x521B;&#x5EFA;&#x4EE3;&#x7801;"><b></b>4.7.2. &#x67E5;&#x770B;&#x8868;&#x7684;&#x521B;&#x5EFA;&#x4EE3;&#x7801;</a></li></ul><li><span class="title-icon "></span><a href="#48-&#x4FEE;&#x6539;&#x8868;&#x7ED3;&#x6784;"><b></b>4.8. &#x4FEE;&#x6539;&#x8868;&#x7ED3;&#x6784;</a></li><ul><li><span class="title-icon "></span><a href="#481-&#x4FEE;&#x6539;&#x8868;&#x540D;"><b></b>4.8.1. &#x4FEE;&#x6539;&#x8868;&#x540D;</a></li><li><span class="title-icon "></span><a href="#482-&#x589E;&#x52A0;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;"><b></b>4.8.2. &#x589E;&#x52A0;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;</a></li><li><span class="title-icon "></span><a href="#483-&#x4FEE;&#x6539;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;"><b></b>4.8.3. &#x4FEE;&#x6539;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;</a></li><li><span class="title-icon "></span><a href="#484-&#x4FEE;&#x6539;&#x8868;&#x7EA7;&#x522B;&#x7EA6;&#x675F;"><b></b>4.8.4. &#x4FEE;&#x6539;&#x8868;&#x7EA7;&#x522B;&#x7EA6;&#x675F;</a></li><li><span class="title-icon "></span><a href="#485-&#x5220;&#x9664;&#x5B57;&#x6BB5;"><b></b>4.8.5. &#x5220;&#x9664;&#x5B57;&#x6BB5;</a></li></ul><li><span class="title-icon "></span><a href="#49-&#x5220;&#x9664;&#x8868;"><b></b>4.9. &#x5220;&#x9664;&#x8868;</a></li></ul></ul></div><a href="#&#x6570;&#x636E;&#x5E93;&#x3001;&#x8868;&#x64CD;&#x4F5C;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 style="font-size:60px;text-align:center;" id="&#x6570;&#x636E;&#x5E93;&#x3001;&#x8868;&#x64CD;&#x4F5C;"><a name="&#x6570;&#x636E;&#x5E93;&#x3001;&#x8868;&#x64CD;&#x4F5C;" class="anchor-navigation-ex-anchor" href="#&#x6570;&#x636E;&#x5E93;&#x3001;&#x8868;&#x64CD;&#x4F5C;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6570;&#x636E;&#x5E93;&#x3001;&#x8868;&#x64CD;&#x4F5C;</h1>

<h1 id="1-sql&#x8BED;&#x6CD5;"><a name="1-sql&#x8BED;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#1-sql&#x8BED;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>1. <code>SQL</code>&#x8BED;&#x6CD5;</h1>
<h2 id="11-&#x7ED3;&#x5C3E;"><a name="11-&#x7ED3;&#x5C3E;" class="anchor-navigation-ex-anchor" href="#11-&#x7ED3;&#x5C3E;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1. &#x7ED3;&#x5C3E;</h2>
<p><code>;</code> &#x8868;&#x793A;&#x4E00;&#x884C;&#x4EE3;&#x7801;&#x89E3;&#x91CA;&#x3002;</p>
<h2 id="12-&#x6CE8;&#x91CA;"><a name="12-&#x6CE8;&#x91CA;" class="anchor-navigation-ex-anchor" href="#12-&#x6CE8;&#x91CA;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2. &#x6CE8;&#x91CA;</h2>
<pre class="language-"><code class="lang-sql"><span class="token comment">-- &#x5355;&#x884C;&#x6CE8;&#x91CA;</span>

<span class="token comment">/**
* &#x591A;&#x884C;&#x6CE8;&#x91CA;
*/</span>
</code></pre>
<h2 id="13-&#x7279;&#x6B8A;&#x540D;&#x79F0;"><a name="13-&#x7279;&#x6B8A;&#x540D;&#x79F0;" class="anchor-navigation-ex-anchor" href="#13-&#x7279;&#x6B8A;&#x540D;&#x79F0;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3. &#x7279;&#x6B8A;&#x540D;&#x79F0;</h2>
<p><strong>&#x5982;&#x679C;&#x8868;&#x540D;&#x6216;&#x8005;&#x5B57;&#x6BB5;&#x7684;&#x540D;&#x79F0;&#x548C;<code>sql</code>&#x5173;&#x952E;&#x5B57;&#x51B2;&#x7A81;&#xFF0C;&#x6216;&#x8005;&#x5E26;&#x6709;&#x7279;&#x6B8A;&#x5B57;&#x7B26;&#xFF0C;&#x8FD9;&#x65F6;&#x5019;&#x5C31;&#x9700;&#x8981;&#x7528;&#x5230; <code>`` </code>&#x3002;</strong></p>
<pre class="language-"><code class="lang-sql"><span class="token keyword">create</span> <span class="token keyword">database</span> <span class="token punctuation">`</span><span class="token keyword">database</span><span class="token punctuation">`</span><span class="token punctuation">;</span>
</code></pre>
<h2 id="14-&#x547D;&#x540D;"><a name="14-&#x547D;&#x540D;" class="anchor-navigation-ex-anchor" href="#14-&#x547D;&#x540D;"><i class="fa fa-link" aria-hidden="true"></i></a>1.4. &#x547D;&#x540D;</h2>
<blockquote>
<p>[!note|style:flat]
<strong><code>SQL</code>&#x7684;&#x5173;&#x952E;&#x5B57;&#xFF0C;&#x5B57;&#x6BB5;&#x540D;&#x5747;&#x4E0D;&#x533A;&#x5206;&#x5927;&#x5C0F;&#x5199;&#x3002;</strong></p>
</blockquote>
<h1 id="2-&#x6570;&#x636E;&#x5E93;&#x9700;&#x8981;&#x64CD;&#x4F5C;&#x7684;&#x5185;&#x5BB9;"><a name="2-&#x6570;&#x636E;&#x5E93;&#x9700;&#x8981;&#x64CD;&#x4F5C;&#x7684;&#x5185;&#x5BB9;" class="anchor-navigation-ex-anchor" href="#2-&#x6570;&#x636E;&#x5E93;&#x9700;&#x8981;&#x64CD;&#x4F5C;&#x7684;&#x5185;&#x5BB9;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x6570;&#x636E;&#x5E93;&#x9700;&#x8981;&#x64CD;&#x4F5C;&#x7684;&#x5185;&#x5BB9;</h1>
<blockquote>
<p>[!note]</p>
<ol>
<li>&#x64CD;&#x4F5C;&#x6570;&#x636E;&#x5E93;</li>
<li>&#x64CD;&#x4F5C;&#x8868;</li>
<li>&#x64CD;&#x4F5C;&#x8868;&#x4E2D;&#x7684;&#x6570;&#x636E;</li>
</ol>
</blockquote>
<h1 id="3-&#x64CD;&#x4F5C;&#x6570;&#x636E;&#x5E93;"><a name="3-&#x64CD;&#x4F5C;&#x6570;&#x636E;&#x5E93;" class="anchor-navigation-ex-anchor" href="#3-&#x64CD;&#x4F5C;&#x6570;&#x636E;&#x5E93;"><i class="fa fa-link" aria-hidden="true"></i></a>3. &#x64CD;&#x4F5C;&#x6570;&#x636E;&#x5E93;</h1>
<h2 id="31-&#x6DFB;&#x52A0;&#x6570;&#x636E;&#x5E93;"><a name="31-&#x6DFB;&#x52A0;&#x6570;&#x636E;&#x5E93;" class="anchor-navigation-ex-anchor" href="#31-&#x6DFB;&#x52A0;&#x6570;&#x636E;&#x5E93;"><i class="fa fa-link" aria-hidden="true"></i></a>3.1. &#x6DFB;&#x52A0;&#x6570;&#x636E;&#x5E93;</h2>
<p><code>if not exists</code>: &#x5224;&#x65AD;&#x4E3A;&#x771F;&#xFF0C;&#x624D;&#x6267;&#x884C;&#x547D;&#x4EE4;&#x3002;</p>
<pre class="language-"><code class="lang-sql"><span class="token keyword">create</span> <span class="token keyword">database</span> <span class="token punctuation">[</span><span class="token keyword">if</span> <span class="token operator">not</span> <span class="token keyword">exists</span><span class="token punctuation">]</span> &#x6570;&#x636E;&#x5E93;&#x540D;<span class="token punctuation">;</span>
</code></pre>
<h2 id="32-&#x5220;&#x9664;&#x6570;&#x636E;&#x5E93;"><a name="32-&#x5220;&#x9664;&#x6570;&#x636E;&#x5E93;" class="anchor-navigation-ex-anchor" href="#32-&#x5220;&#x9664;&#x6570;&#x636E;&#x5E93;"><i class="fa fa-link" aria-hidden="true"></i></a>3.2. &#x5220;&#x9664;&#x6570;&#x636E;&#x5E93;</h2>
<p><code>if exists</code>: &#x5224;&#x65AD;&#x4E3A;&#x771F;&#xFF0C;&#x624D;&#x6267;&#x884C;&#x3002;</p>
<pre class="language-"><code class="lang-sql"><span class="token keyword">drop</span> <span class="token keyword">database</span> <span class="token punctuation">[</span><span class="token keyword">if</span> <span class="token keyword">exists</span><span class="token punctuation">]</span> &#x6570;&#x636E;&#x5E93;<span class="token punctuation">;</span>
</code></pre>
<h2 id="33-&#x4F7F;&#x7528;&#x6570;&#x636E;&#x5E93;"><a name="33-&#x4F7F;&#x7528;&#x6570;&#x636E;&#x5E93;" class="anchor-navigation-ex-anchor" href="#33-&#x4F7F;&#x7528;&#x6570;&#x636E;&#x5E93;"><i class="fa fa-link" aria-hidden="true"></i></a>3.3. &#x4F7F;&#x7528;&#x6570;&#x636E;&#x5E93;</h2>
<pre class="language-"><code class="lang-sql"><span class="token keyword">use</span> <span class="token punctuation">`</span>&#x6570;&#x636E;&#x5E93;&#x540D;<span class="token punctuation">`</span>
</code></pre>
<h2 id="34-&#x5B57;&#x7B26;&#x96C6;"><a name="34-&#x5B57;&#x7B26;&#x96C6;" class="anchor-navigation-ex-anchor" href="#34-&#x5B57;&#x7B26;&#x96C6;"><i class="fa fa-link" aria-hidden="true"></i></a>3.4. &#x5B57;&#x7B26;&#x96C6;</h2>
<pre class="language-"><code class="lang-sql"><span class="token keyword">create</span> <span class="token keyword">database</span> <span class="token punctuation">`</span>&#x540D;&#x79F0;<span class="token punctuation">`</span> <span class="token keyword">character</span> <span class="token keyword">set</span> utf8 <span class="token keyword">collate</span> utf8_general_ci<span class="token punctuation">;</span>
</code></pre>
<ul>
<li><code>character set utf8</code>&#xFF1A;&#x8BBE;&#x5B9A;&#x5B57;&#x7B26;&#x96C6;</li>
<li><code>collate utf8_general_ci</code>&#xFF1A;&#x6821;&#x9A8C;&#x5B57;&#x7B26;&#x96C6;</li>
</ul>
<h1 id="4-&#x64CD;&#x4F5C;&#x8868;"><a name="4-&#x64CD;&#x4F5C;&#x8868;" class="anchor-navigation-ex-anchor" href="#4-&#x64CD;&#x4F5C;&#x8868;"><i class="fa fa-link" aria-hidden="true"></i></a>4. &#x64CD;&#x4F5C;&#x8868;</h1>
<h2 id="41-&#x6570;&#x636E;&#x5E93;&#x6570;&#x636E;&#x7C7B;&#x578B;"><a name="41-&#x6570;&#x636E;&#x5E93;&#x6570;&#x636E;&#x7C7B;&#x578B;" class="anchor-navigation-ex-anchor" href="#41-&#x6570;&#x636E;&#x5E93;&#x6570;&#x636E;&#x7C7B;&#x578B;"><i class="fa fa-link" aria-hidden="true"></i></a>4.1. &#x6570;&#x636E;&#x5E93;&#x6570;&#x636E;&#x7C7B;&#x578B;</h2>
<h3 id="411-&#x6570;&#x503C;"><a name="411-&#x6570;&#x503C;" class="anchor-navigation-ex-anchor" href="#411-&#x6570;&#x503C;"><i class="fa fa-link" aria-hidden="true"></i></a>4.1.1. &#x6570;&#x503C;</h3>
<table>
<thead>
<tr>
<th>&#x7C7B;&#x578B;</th>
<th>&#x63CF;&#x8FF0;</th>
<th>&#x5B57;&#x8282;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>tinyint</code></td>
<td>&#x6700;&#x5C0F;&#x7684;&#x6570;</td>
<td>1</td>
</tr>
<tr>
<td><code>smallint</code></td>
<td>&#x8F83;&#x5C0F;&#x7684;&#x6570;</td>
<td>2</td>
</tr>
<tr>
<td><code>mediumint</code></td>
<td>&#x4E2D;&#x7B49;</td>
<td>3</td>
</tr>
<tr>
<td><code>int</code></td>
<td><strong>&#x6807;&#x51C6;</strong></td>
<td><strong>4</strong></td>
</tr>
<tr>
<td><code>bigint</code></td>
<td>&#x8F83;&#x5927;&#x7684;</td>
<td>8</td>
</tr>
<tr>
<td><code>float</code></td>
<td></td>
<td>4</td>
</tr>
<tr>
<td><code>double</code></td>
<td></td>
<td>8</td>
</tr>
<tr>
<td><code>decimal</code></td>
<td><strong>&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x6D6E;&#x70B9;&#x6570;&#xFF0C;&#x9632;&#x6B62;&#x6D6E;&#x70B9;&#x6570;&#x4E22;&#x5931;&#x7CBE;&#x5EA6;&#xFF1B;&#x91D1;&#x878D;&#x884C;&#x4E1A;</strong></td>
</tr>
</tbody>
</table>
<h3 id="412-&#x5B57;&#x7B26;&#x4E32;"><a name="412-&#x5B57;&#x7B26;&#x4E32;" class="anchor-navigation-ex-anchor" href="#412-&#x5B57;&#x7B26;&#x4E32;"><i class="fa fa-link" aria-hidden="true"></i></a>4.1.2. &#x5B57;&#x7B26;&#x4E32;</h3>
<table>
<thead>
<tr>
<th>&#x7C7B;&#x578B;</th>
<th>&#x63CF;&#x8FF0;</th>
<th>&#x5B57;&#x8282;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>char</code></td>
<td><strong>&#x56FA;&#x5B9A;&#x957F;&#x5EA6;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x8BBE;&#x5B9A;&#x7684;&#x957F;&#x5EA6;&#x5168;&#x90E8;&#x7528;&#x5B8C;</strong></td>
<td>0 ~ 255</td>
</tr>
<tr>
<td><code>varchar</code></td>
<td><strong>&#x5B58;&#x50A8;&#x53D8;&#x957F;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x8BBE;&#x5B9A;&#x7684;&#x957F;&#x5EA6;&#x53EA;&#x662F;&#x6700;&#x5927;&#x503C;</strong></td>
<td>0 ~ 65535</td>
</tr>
<tr>
<td><code>tinytext</code></td>
<td>&#x5FAE;&#x578B;&#x6587;&#x672C;&#x4E32;&#xFF0C;&#x4E0D;&#x80FD;&#x6307;&#x5B9A;&#x9ED8;&#x8BA4;&#x957F;&#x5EA6;</td>
<td>0 ~ 255</td>
</tr>
<tr>
<td><code>text</code></td>
<td><strong>&#x6587;&#x672C;&#x4E32;&#xFF0C;&#x5B58;&#x50A8;&#x53EF;&#x53D8;&#x957F;&#x5EA6;&#x7684;&#x975E;Unicode&#x6570;&#x636E;&#xFF0C;&#x4E0D;&#x80FD;&#x6307;&#x5B9A;&#x9ED8;&#x8BA4;&#x957F;&#x5EA6;&#x3002;</strong></td>
<td>0 ~ 65535</td>
</tr>
</tbody>
</table>
<h3 id="413-&#x65E5;&#x671F;"><a name="413-&#x65E5;&#x671F;" class="anchor-navigation-ex-anchor" href="#413-&#x65E5;&#x671F;"><i class="fa fa-link" aria-hidden="true"></i></a>4.1.3. &#x65E5;&#x671F;</h3>
<table>
<thead>
<tr>
<th>&#x7C7B;&#x578B;</th>
<th>&#x683C;&#x5F0F;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>date</code></td>
<td>YYYY-MM-DD</td>
<td>&#x5E74;&#x6708;&#x65E5;</td>
</tr>
<tr>
<td><code>time</code></td>
<td>hh:mm:ss</td>
<td>&#x65F6;&#x5206;&#x79D2;</td>
</tr>
<tr>
<td><code>datetime</code></td>
<td><strong>YYYY-MM-DD hh:mm:ss</strong></td>
<td><strong>&#x5E74;&#x6708;&#x65E5;&#x65F6;&#x5206;&#x79D2;</strong></td>
</tr>
<tr>
<td><code>timestamp</code></td>
<td><strong>1970.1.1&#x5230;&#x73B0;&#x5728;&#x7684;&#x6BEB;&#x79D2;</strong></td>
<td><strong>&#x65F6;&#x95F4;&#x6233;</strong></td>
</tr>
<tr>
<td><code>year</code></td>
<td></td>
<td>&#x5E74;</td>
</tr>
</tbody>
</table>
<h3 id="414-null"><a name="414-null" class="anchor-navigation-ex-anchor" href="#414-null"><i class="fa fa-link" aria-hidden="true"></i></a>4.1.4. null</h3>
<blockquote>
<p>[!note|style:flat]</p>
<ul>
<li><strong>&#x4E0D;&#x8981;&#x4F7F;&#x7528;<code>null</code>&#x8FDB;&#x884C;&#x7B97;&#x6570;&#x8FD0;&#x7B97;</strong></li>
<li><strong>&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x7A7A;&#x4E3A;<code>&apos;&apos;</code>&#xFF0C;&#x5E76;&#x975E;<code>null</code></strong></li>
</ul>
</blockquote>
<h2 id="42-&#x5B57;&#x6BB5;&#x7684;&#x5C5E;&#x6027;"><a name="42-&#x5B57;&#x6BB5;&#x7684;&#x5C5E;&#x6027;" class="anchor-navigation-ex-anchor" href="#42-&#x5B57;&#x6BB5;&#x7684;&#x5C5E;&#x6027;"><i class="fa fa-link" aria-hidden="true"></i></a>4.2. &#x5B57;&#x6BB5;&#x7684;&#x5C5E;&#x6027;</h2>
<table>
<thead>
<tr>
<th>&#x5B57;&#x6BB5;</th>
<th>&#x4F5C;&#x7528;</th>
<th>&#x6CE8;&#x610F;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>unsigned</code></td>
<td>&#x65E0;&#x7B26;&#x53F7;&#x6574;&#x578B;</td>
<td><strong>&#x4E0D;&#x80FD;&#x4E3A;&#x8D1F;&#x6570;</strong></td>
</tr>
<tr>
<td><code>zerofill</code></td>
<td>&#x672A;&#x4F7F;&#x7528;&#x7684;&#x5B57;&#x8282;&#xFF0C;&#x6839;&#x636E;<code>length</code>&#x8FDB;&#x884C;<code>0</code>&#x586B;&#x5145;</td>
<td></td>
</tr>
<tr>
<td><code>Auto Inc</code></td>
<td>&#x81EA;&#x589E;&#xFF0C;&#x5728;&#x4E0A;&#x4E00;&#x6761;&#x8BB0;&#x5F55;&#x4E0A;&#x52A0;&#x4E00;</td>
<td>1. <strong>&#x7528;&#x6765;&#x8BBE;&#x8BA1;&#x552F;&#x4E00;&#x7684;&#x4E3B;&#x952E;</strong> <br> 2. <strong>&#x5FC5;&#x987B;&#x4E3A;&#x6574;&#x6570;</strong>  <br> 3. <strong>&#x53EF;&#x4EE5;&#x8BBE;&#x5B9A;&#x521D;&#x59CB;&#x503C;&#x3001;&#x6B65;&#x957F;</strong> <br> 3. &#x8D85;&#x8FC7;&#x7C7B;&#x578B;&#x6700;&#x5927;&#x503C;&#x65F6;&#xFF0C;&#x8BBE;&#x7F6E;&#x4E3A;&#x6700;&#x5927;&#x503C;&#xFF0C;&#x5E76;&#x62A5;&#x9519;</td>
</tr>
<tr>
<td><code>not null</code></td>
<td>1. &#x52FE;&#x9009;&#xFF0C;&#x4E0D;&#x7ED9;&#x5BF9;&#x5E94;&#x5143;&#x7D20;&#x590D;&#x5236;&#xFF0C;&#x5C31;&#x4F1A;&#x62A5;&#x9519; <br>  2. &#x4E0D;&#x9009;&#xFF0C;&#x4E0D;&#x586B;&#x503C;&#x9ED8;&#x8BA4;&#x4E3A;<code>null</code></td>
<td></td>
</tr>
<tr>
<td><code>default</code></td>
<td>&#x8BBE;&#x7F6E;&#x9ED8;&#x8BA4;&#x503C;</td>
<td></td>
</tr>
<tr>
<td><code>length</code></td>
<td>1.&#x6570;&#x503C;&#xFF0C;<strong>&#x663E;&#x793A;&#x7684;&#x957F;&#x5EA6;</strong><code>0001</code> <br>                                                 2.<code>char,varchar</code>,<strong>&#x5B57;&#x7B26;&#x7684;&#x957F;&#x5EA6;</strong></td>
</tr>
</tbody>
</table>
<h2 id="43-&#x7EA6;&#x675F;"><a name="43-&#x7EA6;&#x675F;" class="anchor-navigation-ex-anchor" href="#43-&#x7EA6;&#x675F;"><i class="fa fa-link" aria-hidden="true"></i></a>4.3. &#x7EA6;&#x675F;</h2>
<pre class="language-"><code class="lang-sql"><span class="token keyword">create</span> <span class="token keyword">table</span> <span class="token punctuation">[</span><span class="token keyword">if</span> <span class="token operator">not</span> <span class="token keyword">exists</span><span class="token punctuation">]</span> <span class="token punctuation">`</span>&#x8868;&#x660E;<span class="token punctuation">`</span><span class="token punctuation">(</span>
    <span class="token punctuation">`</span>&#x5217;&#x540D;<span class="token punctuation">`</span> &#x7C7B;&#x578B;<span class="token punctuation">(</span>length<span class="token punctuation">)</span> &#x5B57;&#x6BB5;&#x7EA6;&#x675F;<span class="token punctuation">,</span>
    &#x8868;&#x7EA7;&#x7EA6;&#x675F;
<span class="token punctuation">)</span><span class="token punctuation">[</span>&#x8868;&#x7C7B;&#x578B;<span class="token punctuation">]</span> <span class="token punctuation">[</span>&#x5B57;&#x7B26;&#x96C6;<span class="token punctuation">]</span> <span class="token punctuation">[</span>&#x6CE8;&#x91CA;<span class="token punctuation">]</span><span class="token punctuation">;</span>
</code></pre>
<h3 id="431-&#x5B57;&#x6BB5;&#x7EA6;&#x675F;"><a name="431-&#x5B57;&#x6BB5;&#x7EA6;&#x675F;" class="anchor-navigation-ex-anchor" href="#431-&#x5B57;&#x6BB5;&#x7EA6;&#x675F;"><i class="fa fa-link" aria-hidden="true"></i></a>4.3.1. &#x5B57;&#x6BB5;&#x7EA6;&#x675F;</h3>
<table>
<thead>
<tr>
<th>&#x7EA6;&#x675F;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>not null</code></td>
<td>&#x7EA6;&#x675F;&#x8BE5;&#x5B57;&#x6BB5;&#x7684;&#x503C;&#x4E0D;&#x80FD;&#x4E3A;&#x7A7A;</td>
</tr>
<tr>
<td><code>default</code></td>
<td>&#x7EA6;&#x675F;&#x9ED8;&#x8BA4;&#x503C;</td>
</tr>
<tr>
<td><code>primary key</code></td>
<td>&#x7EA6;&#x675F;&#x8BE5;&#x5B57;&#x6BB5;&#x7684;&#x503C;&#x5177;&#x6709;&#x552F;&#x4E00;&#x6027;&#xFF0C;&#x5E76;&#x4E14;&#x975E;&#x7A7A;</td>
</tr>
<tr>
<td><code>unique [key/index]</code></td>
<td>&#x7EA6;&#x675F;&#x8BE5;&#x5B57;&#x6BB5;&#x7684;&#x503C;&#x5177;&#x6709;&#x552F;&#x4E00;&#x6027;&#xFF0C;&#x53EF;&#x4EE5;&#x4E3A;&#x7A7A;</td>
</tr>
<tr>
<td><code>check</code></td>
<td>&#x5B57;&#x6BB5;&#x503C;&#x662F;&#x5426;&#x6709;&#x6548;</td>
</tr>
<tr>
<td><code>auto_increment</code></td>
<td>&#x81EA;&#x589E;&#x7EA6;&#x675F;&#xFF0C;&#x6570;&#x636E;&#x5220;&#x9664;&#x540E;&#xFF0C;&#x503C;&#x4E0D;&#x4F1A;&#x8FDB;&#x884C;&#x8C03;&#x6574;</td>
</tr>
</tbody>
</table>
<h3 id="432-&#x8868;&#x7EA7;&#x7EA6;&#x675F;"><a name="432-&#x8868;&#x7EA7;&#x7EA6;&#x675F;" class="anchor-navigation-ex-anchor" href="#432-&#x8868;&#x7EA7;&#x7EA6;&#x675F;"><i class="fa fa-link" aria-hidden="true"></i></a>4.3.2. &#x8868;&#x7EA7;&#x7EA6;&#x675F;</h3>
<table>
<thead>
<tr>
<th>&#x7EA6;&#x675F;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>primary key</code></td>
<td>&#x7EA6;&#x675F;&#x8BE5;&#x5B57;&#x6BB5;&#x7684;&#x503C;&#x5177;&#x6709;&#x552F;&#x4E00;&#x6027;&#xFF0C;&#x5E76;&#x4E14;&#x975E;&#x7A7A;</td>
</tr>
<tr>
<td><code>unique [key/index]</code></td>
<td>&#x7EA6;&#x675F;&#x8BE5;&#x5B57;&#x6BB5;&#x7684;&#x503C;&#x5177;&#x6709;&#x552F;&#x4E00;&#x6027;&#xFF0C;&#x53EF;&#x4EE5;&#x4E3A;&#x7A7A;</td>
</tr>
<tr>
<td><code>check</code></td>
<td>&#x5B57;&#x6BB5;&#x503C;&#x662F;&#x5426;&#x6709;&#x6548;</td>
</tr>
<tr>
<td><code>FOREIGN KEY</code></td>
<td>&#x7528;&#x6765;&#x786E;&#x4FDD;&#x6570;&#x636E;&#x7684;&#x4E00;&#x81F4;&#x6027;&#xFF0C;&#x7528;&#x4E8E;&#x9650;&#x5236;&#x4E24;&#x4E2A;&#x8868;&#x7684;&#x5173;&#x7CFB;&#xFF0C;&#x7528;&#x4E8E;&#x4FDD;&#x8BC1;&#x8BE5;&#x5B57;&#x6BB5;&#x7684;&#x503C;&#x5FC5;&#x987B;&#x6765;&#x81EA;&#x4E8E;&#x4E3B;&#x8868;&#x7684;&#x5173;&#x8054;&#x5217;&#x7684;&#x503C;</td>
</tr>
</tbody>
</table>
<blockquote>
<p>[!note]
<strong>&#x5BF9;&#x4E8E;&#x7D22;&#x5F15;&#x7EA6;&#x675F;&#xFF0C;&#x9664;&#x4E86;<code>primary key</code>&#xFF0C;&#x5176;&#x4F59;&#x90FD;&#x53EF;&#x4EE5;&#x5B9A;&#x4E49;&#x4E2A;&#x7D22;&#x5F15;&#x540D;&#x3002;</strong></p>
</blockquote>
<h2 id="44-&#x8868;&#x7684;&#x5217;&#x540D;&#x6B63;&#x5F0F;&#x9879;&#x76EE;&#x7528;"><a name="44-&#x8868;&#x7684;&#x5217;&#x540D;&#x6B63;&#x5F0F;&#x9879;&#x76EE;&#x7528;" class="anchor-navigation-ex-anchor" href="#44-&#x8868;&#x7684;&#x5217;&#x540D;&#x6B63;&#x5F0F;&#x9879;&#x76EE;&#x7528;"><i class="fa fa-link" aria-hidden="true"></i></a>4.4. &#x8868;&#x7684;&#x5217;&#x540D;(&#x6B63;&#x5F0F;&#x9879;&#x76EE;&#x7528;)</h2>
<table>
<thead>
<tr>
<th>&#x5217;&#x540D;</th>
<th>&#x4F5C;&#x7528;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>id</code></td>
<td>&#x4E3B;&#x952E;</td>
</tr>
<tr>
<td><code>version</code></td>
<td>&#x4E50;&#x89C2;&#x9501;</td>
</tr>
<tr>
<td><code>is_delete</code></td>
<td>&#x4F2A;&#x5220;&#x9664;&#xFF0C;&#x53EA;&#x662F;&#x6807;&#x8BB0;&#x6570;&#x636E;&#x88AB;&#x5220;&#x9664;&#xFF0C;&#x4F46;&#x662F;&#x6570;&#x7EC4;&#x4ECD;&#x7136;&#x50A8;&#x5B58;&#x5728;&#x6570;&#x636E;&#x5E93;&#x4E2D;</td>
<td></td>
</tr>
<tr>
<td><code>gmt_create</code></td>
<td>&#x521B;&#x5EFA;&#x65F6;&#x95F4;</td>
</tr>
<tr>
<td><code>gmt_update</code></td>
<td>&#x4FEE;&#x6539;&#x65F6;&#x95F4;</td>
</tr>
</tbody>
</table>
<h2 id="45-&#x8868;&#x7684;&#x7C7B;&#x578B;"><a name="45-&#x8868;&#x7684;&#x7C7B;&#x578B;" class="anchor-navigation-ex-anchor" href="#45-&#x8868;&#x7684;&#x7C7B;&#x578B;"><i class="fa fa-link" aria-hidden="true"></i></a>4.5. &#x8868;&#x7684;&#x7C7B;&#x578B;</h2>
<table>
<thead>
<tr>
<th>&#x9879;&#x76EE;</th>
<th>&#x63CF;&#x8FF0;</th>
<th><code>MYISAM</code></th>
<th><code>INNODB</code></th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x4E8B;&#x52A1;</td>
<td>&#x4E00;&#x6BB5;&#x6346;&#x7ED1;&#x6267;&#x884C;&#x7684;&#x4E1A;&#x52A1;&#x903B;&#x8F91;</td>
<td>&#x4E0D;&#x652F;&#x6301;</td>
<td>&#x652F;&#x6301;</td>
</tr>
<tr>
<td>&#x884C;&#x9501;&#x5B9A;</td>
<td>&#x591A;&#x7528;&#x6237;&#xFF0C;&#x53EF;&#x5BF9;&#x884C;&#x64CD;&#x4F5C;&#x8FDB;&#x884C;&#x9501;&#x5B9A;</td>
<td>&#x4E0D;&#x652F;&#x6301;</td>
<td>&#x652F;&#x6301;</td>
</tr>
<tr>
<td>&#x5916;&#x952E;&#x7EA6;&#x675F;</td>
<td>&#x5EFA;&#x7ACB;&#x4E3B;&#x4ECE;&#x8868;&#x5173;&#x7CFB;&#xFF0C;&#x786E;&#x5B9A;&#x6570;&#x636E;&#x4E00;&#x81F4;&#x6027;</td>
<td>&#x4E0D;&#x652F;&#x6301;</td>
<td>&#x652F;&#x6301;</td>
</tr>
<tr>
<td>&#x5168;&#x6587;&#x7D22;&#x5F15;</td>
<td></td>
<td>&#x652F;&#x6301;</td>
<td>&#x4E0D;&#x652F;&#x6301;</td>
</tr>
<tr>
<td>&#x50A8;&#x5B58;&#x7A7A;&#x95F4;</td>
<td></td>
<td>&#x8F83;&#x5C0F;</td>
<td>&#x7EA6;&#x4E3A;<code>MYISAM</code>&#x7684;&#x4E24;&#x500D;</td>
</tr>
</tbody>
</table>
<p><strong>&#x7269;&#x7406;&#x7A7A;&#x95F4;&#x50A8;&#x5B58;&#xFF1A;</strong></p>
<ul>
<li><strong>&#x8868;&#x90FD;&#x5B58;&#x50A8;&#x5728;&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#x7684;&#x6587;&#x4EF6;&#x5939;&#x4E0B;</strong></li>
<li><code>INNODB</code> <strong>&#x4E24;&#x4E2A;&#x6587;&#x4EF6;</strong><ul>
<li><code>.frm</code>: &#x5B58;&#x50A8;&#x8868;&#x7684;&#x7ED3;&#x6784;&#x4FE1;&#x606F;&#xFF0C;&#x5728;&#x6570;&#x636E;&#x5E93;&#x6587;&#x4EF6;&#x5939;&#x4E0B;</li>
<li><code>ibdata1</code>: <strong>&#x5B58;&#x50A8;&#x6570;&#x636E;&#xFF0C;&#x4E0E;&#x6570;&#x636E;&#x5E93;&#x6587;&#x4EF6;&#x5939;&#x540C;&#x7EA7;</strong></li>
</ul>
</li>
<li><code>MYISAM</code> <strong>&#x4E09;&#x4E2A;&#x6587;&#x4EF6;</strong><ul>
<li><code>.frm</code>: &#x5B58;&#x50A8;&#x8868;&#x7684;&#x7ED3;&#x6784;&#x4FE1;&#x606F;</li>
<li><code>.MYD</code>&#xFF1A;&#x5B58;&#x50A8;&#x6570;&#x636E;</li>
<li><code>.MYI</code>&#xFF1A;&#x5B58;&#x50A8;&#x7D22;&#x5F15;</li>
</ul>
</li>
</ul>
<h2 id="46-&#x521B;&#x5EFA;&#x8868;"><a name="46-&#x521B;&#x5EFA;&#x8868;" class="anchor-navigation-ex-anchor" href="#46-&#x521B;&#x5EFA;&#x8868;"><i class="fa fa-link" aria-hidden="true"></i></a>4.6. &#x521B;&#x5EFA;&#x8868;</h2>
<pre class="language-"><code class="lang-sql"><span class="token keyword">create</span> <span class="token keyword">table</span> <span class="token punctuation">[</span><span class="token keyword">if</span> <span class="token operator">not</span> <span class="token keyword">exists</span><span class="token punctuation">]</span> <span class="token punctuation">`</span>&#x8868;&#x660E;<span class="token punctuation">`</span><span class="token punctuation">(</span>
    <span class="token punctuation">`</span>&#x5217;&#x540D;<span class="token punctuation">`</span> &#x7C7B;&#x578B;<span class="token punctuation">(</span>length<span class="token punctuation">)</span> <span class="token punctuation">[</span>&#x5C5E;&#x6027;<span class="token punctuation">]</span> <span class="token punctuation">[</span>&#x7D22;&#x5F15;<span class="token punctuation">]</span> <span class="token punctuation">[</span>&#x6CE8;&#x91CA;<span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
    <span class="token punctuation">`</span>&#x5217;&#x540D;<span class="token punctuation">`</span> &#x7C7B;&#x578B;<span class="token punctuation">(</span>length<span class="token punctuation">)</span> <span class="token punctuation">[</span>&#x5C5E;&#x6027;<span class="token punctuation">]</span> <span class="token punctuation">[</span>&#x7D22;&#x5F15;<span class="token punctuation">]</span> <span class="token punctuation">[</span>&#x6CE8;&#x91CA;<span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token keyword">primary</span> <span class="token keyword">key</span> <span class="token punctuation">(</span><span class="token punctuation">`</span>&#x5217;&#x540D;<span class="token punctuation">`</span><span class="token punctuation">)</span>
<span class="token punctuation">)</span><span class="token punctuation">[</span>&#x8868;&#x7C7B;&#x578B;<span class="token punctuation">]</span> <span class="token punctuation">[</span>&#x5B57;&#x7B26;&#x96C6;<span class="token punctuation">]</span> <span class="token punctuation">[</span>&#x6CE8;&#x91CA;<span class="token punctuation">]</span><span class="token punctuation">;</span>
</code></pre>
<sec data-title="&#x6848;&#x4F8B;&#x4EE3;&#x7801;" data-id="create_table" data-show="true" data-collapse="true"><div class="panel panel-default"><div class="panel-heading"><b>&#x6848;&#x4F8B;&#x4EE3;&#x7801;<a class="pull-right section atTitle btn btn-default" target="create_table"><span class="fa fa-angle-up"></span></a></b></div><div class="panel-collapse in" id="create_table"><div class="panel-body">
<pre class="language-"><code class="lang-sql"><span class="token keyword">CREATE</span> <span class="token keyword">table</span> <span class="token keyword">if</span> <span class="token operator">not</span> <span class="token keyword">exists</span> <span class="token punctuation">`</span>student<span class="token punctuation">`</span><span class="token punctuation">(</span>
    <span class="token punctuation">`</span>id<span class="token punctuation">`</span> <span class="token keyword">int</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span> <span class="token keyword">AUTO_INCREMENT</span> <span class="token keyword">COMMENT</span> <span class="token string">&apos;&#x5B66;&#x53F7;&apos;</span><span class="token punctuation">,</span>
    <span class="token punctuation">`</span>name<span class="token punctuation">`</span> <span class="token keyword">VARCHAR</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span> <span class="token keyword">DEFAULT</span> <span class="token string">&apos;&#x674E;&#x534E;&apos;</span> <span class="token keyword">COMMENT</span> <span class="token string">&apos;&#x540D;&#x5B57;&apos;</span><span class="token punctuation">,</span>
    <span class="token punctuation">`</span>sex<span class="token punctuation">`</span> <span class="token keyword">VARCHAR</span><span class="token punctuation">(</span><span class="token number">2</span><span class="token punctuation">)</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span> <span class="token keyword">DEFAULT</span> <span class="token string">&apos;&#x7537;&apos;</span> <span class="token keyword">COMMENT</span> <span class="token string">&apos;&#x6027;&#x522B;&apos;</span><span class="token punctuation">,</span>
    <span class="token punctuation">`</span>number<span class="token punctuation">`</span> <span class="token keyword">VARCHAR</span><span class="token punctuation">(</span><span class="token number">11</span><span class="token punctuation">)</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span> <span class="token keyword">DEFAULT</span> <span class="token string">&apos;10086&apos;</span> <span class="token keyword">COMMENT</span> <span class="token string">&apos;&#x7535;&#x8BDD;&apos;</span><span class="token punctuation">,</span>
    <span class="token keyword">PRIMARY</span> <span class="token keyword">KEY</span><span class="token punctuation">(</span><span class="token punctuation">`</span>id<span class="token punctuation">`</span><span class="token punctuation">)</span> 
<span class="token punctuation">)</span><span class="token keyword">engine</span><span class="token operator">=</span><span class="token keyword">InnoDB</span> <span class="token keyword">charset</span><span class="token operator">=</span>utf8 <span class="token keyword">COMMENT</span><span class="token operator">=</span><span class="token string">&apos;&#x5B66;&#x751F;&apos;</span><span class="token punctuation">;</span>
</code></pre>
</div></div></div></sec>
<blockquote>
<p>[!note|style:flat]
<strong>&#x7ED9;&#x5B9A;&#x4E86;<code>not null</code>&#x5C5E;&#x6027;&#x540E;&#xFF0C;&#x5C31;&#x4E0D;&#x80FD;&#x518D;&#x8BBE;&#x7F6E;<code>default null</code>&#x3002;</strong></p>
</blockquote>
<h2 id="47-&#x67E5;&#x770B;&#x8868;"><a name="47-&#x67E5;&#x770B;&#x8868;" class="anchor-navigation-ex-anchor" href="#47-&#x67E5;&#x770B;&#x8868;"><i class="fa fa-link" aria-hidden="true"></i></a>4.7. &#x67E5;&#x770B;&#x8868;</h2>
<h3 id="471-&#x67E5;&#x770B;&#x8868;&#x7684;&#x5217;&#x7ED3;&#x6784;"><a name="471-&#x67E5;&#x770B;&#x8868;&#x7684;&#x5217;&#x7ED3;&#x6784;" class="anchor-navigation-ex-anchor" href="#471-&#x67E5;&#x770B;&#x8868;&#x7684;&#x5217;&#x7ED3;&#x6784;"><i class="fa fa-link" aria-hidden="true"></i></a>4.7.1. &#x67E5;&#x770B;&#x8868;&#x7684;&#x5217;&#x7ED3;&#x6784;</h3>
<pre class="language-"><code class="lang-sql"><span class="token keyword">describe</span> <span class="token punctuation">`</span>&#x8868;&#x540D;<span class="token punctuation">`</span><span class="token punctuation">;</span>
</code></pre>
<h3 id="472-&#x67E5;&#x770B;&#x8868;&#x7684;&#x521B;&#x5EFA;&#x4EE3;&#x7801;"><a name="472-&#x67E5;&#x770B;&#x8868;&#x7684;&#x521B;&#x5EFA;&#x4EE3;&#x7801;" class="anchor-navigation-ex-anchor" href="#472-&#x67E5;&#x770B;&#x8868;&#x7684;&#x521B;&#x5EFA;&#x4EE3;&#x7801;"><i class="fa fa-link" aria-hidden="true"></i></a>4.7.2. &#x67E5;&#x770B;&#x8868;&#x7684;&#x521B;&#x5EFA;&#x4EE3;&#x7801;</h3>
<pre class="language-"><code class="lang-sql"><span class="token keyword">show</span> <span class="token keyword">create</span> <span class="token keyword">table</span> <span class="token punctuation">`</span>&#x8868;&#x540D;<span class="token punctuation">`</span><span class="token punctuation">;</span>
</code></pre>
<h2 id="48-&#x4FEE;&#x6539;&#x8868;&#x7ED3;&#x6784;"><a name="48-&#x4FEE;&#x6539;&#x8868;&#x7ED3;&#x6784;" class="anchor-navigation-ex-anchor" href="#48-&#x4FEE;&#x6539;&#x8868;&#x7ED3;&#x6784;"><i class="fa fa-link" aria-hidden="true"></i></a>4.8. &#x4FEE;&#x6539;&#x8868;&#x7ED3;&#x6784;</h2>
<h3 id="481-&#x4FEE;&#x6539;&#x8868;&#x540D;"><a name="481-&#x4FEE;&#x6539;&#x8868;&#x540D;" class="anchor-navigation-ex-anchor" href="#481-&#x4FEE;&#x6539;&#x8868;&#x540D;"><i class="fa fa-link" aria-hidden="true"></i></a>4.8.1. &#x4FEE;&#x6539;&#x8868;&#x540D;</h3>
<pre class="language-"><code class="lang-sql"><span class="token keyword">alter</span> <span class="token keyword">table</span> <span class="token punctuation">`</span>&#x8868;&#x540D;<span class="token punctuation">`</span> <span class="token keyword">rename</span> <span class="token keyword">as</span> <span class="token punctuation">`</span>&#x65B0;&#x8868;&#x540D;<span class="token punctuation">`</span><span class="token punctuation">;</span>
</code></pre>
<h3 id="482-&#x589E;&#x52A0;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;"><a name="482-&#x589E;&#x52A0;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;" class="anchor-navigation-ex-anchor" href="#482-&#x589E;&#x52A0;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;"><i class="fa fa-link" aria-hidden="true"></i></a>4.8.2. &#x589E;&#x52A0;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;</h3>
<pre class="language-"><code class="lang-sql"><span class="token keyword">alter</span> <span class="token keyword">table</span> <span class="token punctuation">`</span>&#x8868;&#x540D;<span class="token punctuation">`</span> <span class="token keyword">add</span> <span class="token punctuation">`</span>&#x5217;&#x540D;<span class="token punctuation">`</span> &#x7C7B;&#x578B;&#x540D;<span class="token punctuation">(</span>length<span class="token punctuation">)</span> <span class="token punctuation">[</span>&#x5C5E;&#x6027;<span class="token punctuation">]</span> <span class="token punctuation">[</span>&#x7D22;&#x5F15;<span class="token punctuation">]</span> <span class="token punctuation">[</span>&#x6CE8;&#x91CA;<span class="token punctuation">]</span><span class="token punctuation">;</span>
</code></pre>
<h3 id="483-&#x4FEE;&#x6539;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;"><a name="483-&#x4FEE;&#x6539;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;" class="anchor-navigation-ex-anchor" href="#483-&#x4FEE;&#x6539;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;"><i class="fa fa-link" aria-hidden="true"></i></a>4.8.3. &#x4FEE;&#x6539;&#x5B57;&#x6BB5;&#xFF08;&#x5217;&#xFF09;</h3>
<p><strong>&#x4FEE;&#x6539;&#x7C7B;&#x578B;&#xFF0C;&#x7EA6;&#x675F;&#xFF08;&#x5217;&#x5C5E;&#x6027;&#xFF09;&#xFF1A;</strong></p>
<pre class="language-"><code class="lang-sql"><span class="token keyword">alter</span> <span class="token keyword">table</span> <span class="token punctuation">`</span>&#x8868;&#x540D;<span class="token punctuation">`</span> <span class="token keyword">modify</span> <span class="token punctuation">`</span>&#x5217;&#x540D;<span class="token punctuation">`</span> <span class="token punctuation">[</span>&#x7C7B;&#x578B;&#xFF0C;&#x7EA6;&#x675F;<span class="token punctuation">]</span><span class="token punctuation">;</span>
</code></pre>
<p><strong>&#x53EF;&#x4EE5;&#x91CD;&#x547D;&#x540D;&#xFF0C;&#x4FEE;&#x6539;&#x7C7B;&#x578B;&#xFF0C;&#x7EA6;&#x675F;&#xFF1A;</strong></p>
<pre class="language-"><code class="lang-sql"><span class="token keyword">alter</span> <span class="token keyword">table</span> <span class="token punctuation">`</span>&#x8868;&#x540D;<span class="token punctuation">`</span> change <span class="token punctuation">`</span>&#x5217;&#x540D;<span class="token punctuation">`</span> <span class="token punctuation">`</span>&#x65B0;&#x5217;&#x540D;<span class="token punctuation">`</span> <span class="token punctuation">[</span>&#x7C7B;&#x578B;&#xFF0C;&#x7EA6;&#x675F;<span class="token punctuation">]</span><span class="token punctuation">;</span>
</code></pre>
<blockquote>
<p>[!note|style:flat]
<strong>&#x91CD;&#x65B0;&#x4FEE;&#x6539;&#x5B57;&#x6BB5;&#xFF0C;<code>[&#x7C7B;&#x578B;&#xFF0C;&#x7EA6;&#x675F;]</code>&#x4E5F;&#x4F1A;&#x8DDF;&#x7740;&#x4EE5;&#x524D;&#x4FEE;&#x6539;&#x6389;&#xFF0C;&#x4E0D;&#x6307;&#x5B9A;&#x5C31;&#x6CA1;&#x6709;&#x3002;</strong></p>
</blockquote>
<h3 id="484-&#x4FEE;&#x6539;&#x8868;&#x7EA7;&#x522B;&#x7EA6;&#x675F;"><a name="484-&#x4FEE;&#x6539;&#x8868;&#x7EA7;&#x522B;&#x7EA6;&#x675F;" class="anchor-navigation-ex-anchor" href="#484-&#x4FEE;&#x6539;&#x8868;&#x7EA7;&#x522B;&#x7EA6;&#x675F;"><i class="fa fa-link" aria-hidden="true"></i></a>4.8.4. &#x4FEE;&#x6539;&#x8868;&#x7EA7;&#x522B;&#x7EA6;&#x675F;</h3>
<p><strong>&#x589E;&#x52A0;&#xFF1A;</strong></p>
<pre class="language-"><code class="lang-sql"><span class="token keyword">alter</span> <span class="token keyword">table</span> <span class="token punctuation">`</span>&#x8868;&#x540D;<span class="token punctuation">`</span> <span class="token keyword">add</span> &#x7EA6;&#x675F; <span class="token punctuation">[</span><span class="token punctuation">`</span>&#x7D22;&#x5F15;&#x540D;<span class="token punctuation">`</span><span class="token punctuation">]</span> <span class="token punctuation">(</span><span class="token punctuation">`</span>&#x5B57;&#x6BB5;<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<p><strong>&#x5220;&#x9664;&#xFF1A;</strong></p>
<pre class="language-"><code class="lang-sql"><span class="token keyword">alter</span> <span class="token keyword">table</span> <span class="token punctuation">`</span>&#x8868;&#x540D;<span class="token punctuation">`</span> <span class="token keyword">drop</span> &#x7EA6;&#x675F; <span class="token punctuation">[</span><span class="token punctuation">`</span>&#x7D22;&#x5F15;&#x540D;<span class="token punctuation">`</span> <span class="token punctuation">(</span><span class="token punctuation">`</span>&#x5B57;&#x6BB5;<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
</code></pre>
<h3 id="485-&#x5220;&#x9664;&#x5B57;&#x6BB5;"><a name="485-&#x5220;&#x9664;&#x5B57;&#x6BB5;" class="anchor-navigation-ex-anchor" href="#485-&#x5220;&#x9664;&#x5B57;&#x6BB5;"><i class="fa fa-link" aria-hidden="true"></i></a>4.8.5. &#x5220;&#x9664;&#x5B57;&#x6BB5;</h3>
<pre class="language-"><code class="lang-sql"><span class="token keyword">alter</span> <span class="token keyword">table</span> <span class="token punctuation">`</span>&#x8868;&#x540D;<span class="token punctuation">`</span> <span class="token keyword">drop</span> <span class="token punctuation">`</span>&#x5217;&#x540D;<span class="token punctuation">`</span><span class="token punctuation">;</span>
</code></pre>
<h2 id="49-&#x5220;&#x9664;&#x8868;"><a name="49-&#x5220;&#x9664;&#x8868;" class="anchor-navigation-ex-anchor" href="#49-&#x5220;&#x9664;&#x8868;"><i class="fa fa-link" aria-hidden="true"></i></a>4.9. &#x5220;&#x9664;&#x8868;</h2>
<pre class="language-"><code class="lang-sql"><span class="token keyword">drop</span> <span class="token keyword">table</span> <span class="token punctuation">[</span><span class="token keyword">if</span> <span class="token keyword">exists</span><span class="token punctuation">]</span> <span class="token punctuation">`</span>&#x8868;&#x540D;<span class="token punctuation">`</span><span class="token punctuation">;</span>
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="foundation_withNum.html" class="navigation navigation-prev " aria-label="Previous page: 二、控制台操作">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="operatorData_withNum.html" class="navigation navigation-next " aria-label="Next page: 四、数据操作">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"三、数据库、表操作","level":"3.1.3","depth":2,"next":{"title":"四、数据操作","level":"3.1.4","depth":2,"path":"MySQL/chapter/operatorData_withNum.md","ref":"MySQL/chapter/operatorData_withNum.md","articles":[]},"previous":{"title":"二、控制台操作","level":"3.1.2","depth":2,"path":"MySQL/chapter/foundation_withNum.md","ref":"MySQL/chapter/foundation_withNum.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","search-pro-fixed","expandable-chapters-small","ancre-navigation","hide-element","code","splitter","insert-logo-link-website","-sharing","sharing-plus","prism","-highlight","flexible-alerts","lightbox","pageview-count","auto-scroll-table","katex-pro","favicon-absolute","sectionx","terminull-light","livereload"],"styles":{"website":"styles/website.css","ebook":"styles/ebook.css","pdf":"styles/pdf.css","mobi":"styles/mobi.css","epub":"styles/epub.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism-tomorrow.css"],"lang":{"flow":"typescript"}},"livereload":{},"splitter":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"auto-scroll-table":{},"code":{"copyButtons":true},"terminull-light":{},"search-pro-fixed":{},"favicon-absolute":{"favicon":"image/ico.png","appleTouchIconPrecomposed152":"image/ico.png","appleTouchIconMore":{},"appleTouchIconPrecomposedMore":{}},"hide-element":{"elements":[".gitbook-link"]},"katex-pro":{},"fontsettings":{"theme":"white","family":"sans","size":2},"sectionx":{"tag":"b"},"lightbox":{"jquery":true,"sameUuid":false},"insert-logo-link-website":{"url":"image/logo.png","link":"https://space.bilibili.com/27206875","target":"_blank","style":"height: 230px"},"pageview-count":{},"ancre-navigation":{"showLevel":true,"associatedWithSummary":true,"mode":"float","printLog":false,"multipleH1":true,"float":{"showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""},"pageTop":{"showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""}},"expandable-chapters-small":{},"flexible-alerts":{"style":"callout","note":{"label":"Note","icon":"fa fa-info-circle","className":"info"},"tip":{"label":"Tip","icon":"fa fa-lightbulb-o","className":"tip"},"warning":{"label":"Warning","icon":"fa fa-exclamation-triangle","className":"warning"},"danger":{"label":"Attention","icon":"fa fa-ban","className":"danger"}},"sharing":{"qq":true,"all":["douban","facebook","google","instapaper","linkedin","twitter","weibo","messenger","qq","qzone","viber","whatsapp"],"douban":false,"facebook":false,"weibo":true,"whatsapp":false,"twitter":false,"pocket":false,"google":true,"qzone":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"海拉尔的三角","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"计算机笔记","links":{"sidebar":{"Github":"https://github.com/spite-triangle"}},"gitbook":"*"},"file":{"path":"MySQL/chapter/operatorDB_withNum.md","mtime":"2021-09-14T15:43:13.642Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-09-14T15:43:23.052Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro-fixed/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro-fixed/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-insert-logo-link-website/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lightbox/js/lightbox.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-auto-scroll-table/plugin.js"></script>
        
    
        
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sectionx/sectionx.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-terminull-light/terminull.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

